#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <cstring>
using namespace std;
typedef long long ll;
struct node {
	ll y1,y2;
	bool operator < (const node& a) const {
		if (y1<a.y1) return true;
		if (y1==a.y1) return y2<a.y2;
		return false;
	}
};
const int MAXN=1e5+7;
node a[MAXN];
ll dp[MAXN];
int main() {
	ll n,r,w,h;
//	freopen("in.txt", "r", stdin);
	cin.sync_with_stdio(false);
	ll x,y;
	while (cin>>n>>r>>w>>h) {
		for (int i=0; i<n; ++i) {
			cin>>x>>y;
			a[i].y1=r*x+y;
			a[i].y2=r*(w-x)+y;
		}
		memset(dp, 0x3f, sizeof(dp));
		sort(a,a+n);
		ll res=0;
		ll p;
		for (int i=0; i<n; ++i) {
			y=a[i].y2;
			p=upper_bound(dp, dp+res, y)-dp;
//			cout<<"p: "<<p<<endl;
			dp[p]=a[i].y2;
			if (p==res) ++res;
		}
		cout<<res<<endl;
	}
	return 0;
}
